package api

import (
	"client/common"
	"github.com/gin-gonic/gin"
)

func UploadFile(c *gin.Context) {
	file, err := c.FormFile("file")
	if err != nil {
		panic(err)
	}
	s := common.AliUploadFile(file.Filename, file)
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "success",
		"data": s,
	})
	return
}
